package policies

import (
	"gitee.com/sweetsunnyflower/carpooling-server-go/app/models/rider"
)

func CanViewRider(userId uint64, rider rider.Rider) bool {
	return userId == rider.UserId
}

func CanModifyRider(userId uint64, rider rider.Rider) bool {
	return userId == rider.UserId
}

func CanCreateRider(userId uint64, rider rider.Rider) bool {
	// return userId == rider.UserId
	return true
}

func CanUpdateRider(userId uint64, rider rider.Rider) bool {
	// return userId == rider.UserId
	return true
}

func CanDeleteRider(userId uint64, rider rider.Rider) bool {
	return userId == rider.UserId
}
